PlatformApi

interface PlatformApi

API for abstraction of simple ModLoader requests

Author

fzzyhmstrs

Since

0.5.0

Functions

Link copied to clipboard
abstract fun configDir(): File

The config directory

Link copied to clipboard
@ApiStatus.Experimental
abstract fun <T> createRegistrar(namespace: String, registry: Registry<T>): Registrar<T>

Creates a Registrar wrapper for registering objects in a platform-agnostic way.

Link copied to clipboard
abstract fun devLogger(name: String): Logger

Returns a logger that checks if the current environment isDev before doing any logging

Link copied to clipboard
abstract fun gameDir(): File

The root game directory

Link copied to clipboard
abstract fun isClient(): Boolean

Whether the game includes a logical client or not. This will be true both for singleplayer games and the client side of a multiplayer game.

Link copied to clipboard
abstract fun isDev(): Boolean

Whether the current JVM environment is a development environment

Link copied to clipboard
abstract fun isModLoaded(mod: String): Boolean

Returns whether another mod is loaded based on their registered mod_id.